import { createApp } from "vue";
import { createPinia } from "pinia";
import App from "./App.vue";
import "./assets/reset.css";
import router from "./router";

const pinia = createPinia();
const app = createApp(App);
app.use(pinia);
app.use(router);
app.config.globalProperties.$setAddEventListener = function (item) {
  const _this = this;
  document.addEventListener('click', (e) => _this.$unbindListen(e, item), false);
}

app.config.globalProperties.$unbindListen = function (e, item) {
  this[item] = false;
  document.removeEventListener('click', this.$unbindListen, false);
}

import "virtual:windi.css";

app.mount("#app");
